package com.example.controller;

import com.example.service.UserService;
import io.swagger.annotations.ApiModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/userImport")
@ApiModel(value="导出", description="")
public class UserImpot {
    @Autowired
    private UserService userService;
    @PostMapping("/import")
    public void importUsers(final MultipartFile file){
        try {
            userService.importUsers(file);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
